﻿using System;
using Framework.Resource;
using UnityEngine.SceneManagement;

namespace Framework
{

    public class SceneManager : FrameworkComponent
    {
        private IResourceManager m_resourceManager;
        private void Start()
        {
            m_resourceManager = GameEntry.GetComponent<ResourceManager>();
        }

        public void LoadScene(string sceneAssetName,LoadSceneMode mode,bool suspendLoad)
        {
            m_resourceManager.LoadScene(sceneAssetName,null,mode,suspendLoad);
        }

        public void UnLoadScene(string sceneAssetName)
        {
            m_resourceManager.UnLoadScene(sceneAssetName,null);
        }

        public override void OnUpdate(float elapseSeconds, float realElapseSeconds)
        {
            // throw new NotImplementedException();
        }

        public override void Shutdown()
        {
            // throw new NotImplementedException();
        }
    }

}